package com.ujiaoyu.api.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import java.io.Serializable;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * <p>
 * 课程表
 * </p>
 *
 * @author ujiaoyu508
 * @since 2020-09-06
 */
@Data
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="Course对象", description="课程表")
public class Course implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "ID")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty(value = "标题")
    private String title;

    @ApiModelProperty(value = "分类ID")
    private Integer categoryId;

    @TableField(exist = false)
    @ApiModelProperty("分类名称")
    private String categoryName;

    @ApiModelProperty(value = "科目ID")
    private Integer subjectId;

    @TableField(exist = false)
    @ApiModelProperty("科目名称")
    private String subjectName;


    @ApiModelProperty(value = "图片地址")
    private String image;

    @ApiModelProperty(value = "课程内容")
    private String content;

    @ApiModelProperty(value = "有效期")
    private Integer countDay;

    @ApiModelProperty(value = "课时")
    private Integer countHour;

    @ApiModelProperty(value = "有多少人报名")
    private Integer saleCount;

    @ApiModelProperty(value = "价格")
    private Double price;

    @ApiModelProperty(value = "原始价格")
    private Double originalPrice;

    @ApiModelProperty(value = "1 付费 2 免费")
    private Integer priceType;

    @ApiModelProperty(value = "1 录播 2 直播 3 面授")
    private Integer teachType;

    private LocalDateTime createTime;

    @ApiModelProperty(value = "0 否 1 是")
    private Integer deleted;

    @TableField(exist=false)
    @ApiModelProperty("是否购买")
    private Boolean bought;



}
